package com.qd.common.panda.domain.entity.order;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单列表显示信息
 *
 * @author sjk
 * @create 2022-10-12 15:40
 * @since 1.0.0
 */
@Data
@ToString
public class OrderDTO {

    /**
     * 订单ID
     */
    private String orderId;
    /**
     * 加油站名称
     */
    private String parkName;
    /**
     * 加油站名称，存储数据时候的加油站名称
     */
    @JsonIgnore
    private String parkIdDisplay;
    /**
     * 开始时间
     */
    private LocalDateTime startTime;
    /**
     * 结束时间
     */
    private LocalDateTime endTime;
    /**
     * 订单金额
     */
    private BigDecimal orderAmount;
    /**
     * 订单金额显示
     */
    private String orderAmountDisplay;
    /**
     * 实际支付金额
     */
    private BigDecimal payAmount;
    /**
     * 实际支付金额显示
     */
    private String payAmountDisplay;
    /**
     * 服务费
     */
    private BigDecimal serviceCharge;
    /**
     * 服务费显示
     */
    private String serviceChargeDisplay;
    /**
     * 优惠金额
     */
    private BigDecimal discountAmount;
    /**
     * 优惠金额显示
     */
    private String discountAmountDisplay;
    /**
     * 行程类型
     */
    private Integer tripType;
    /**
     * 行程类型显示
     */
    private String tripTypeDisplay;
    /**
     * 油站类型
     */
    private String stationType;
    /**
     * 油站类型显示
     */
    private String stationTypeDisplay;
    /**
     * 短租订单
     */
    private JsonNode parkInfo;
    /**
     * 商城订单
     */
    private JsonNode mall;

    public void freeData() {
        this.orderId = null;
        this.parkName = null;
        this.parkIdDisplay = null;
        this.startTime = null;
        this.endTime = null;
        this.orderAmount = null;
        this.orderAmountDisplay = null;
        this.payAmount = null;
        this.payAmountDisplay = null;
        this.serviceCharge = null;
        this.serviceChargeDisplay = null;
        this.discountAmount = null;
        this.discountAmountDisplay = null;
        this.tripType = null;
        this.tripTypeDisplay = null;
        this.stationType = null;
        this.stationTypeDisplay = null;
        this.parkInfo = null;
        this.mall = null;
    }
}